package cn.com.roy.thread.t3_2_5.join_sleep_2;

public class ThreadA  extends  Thread{
    private ThreadB b;

    public ThreadA(ThreadB b){
        this.b = b;
    }

    @Override
    public void run() {
        super.run();
        synchronized (b){
            b.start();
            try {
                b.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }
}
